﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ExamineScrapList.aspx.cs" Inherits="HQWeb.LibarySys.ExamineScrapList" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <link href="../Styles/GridViewStyle.css" rel="Stylesheet" type="text/css" />
    <%--<link href="../Styles/Site.css" rel="Stylesheet" type="text/css" />--%>
    <script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
</head>
<body>
    <form id="form1" runat="server">
     <asp:ScriptManager ID="ScriptManager" runat="server" />
    <ajaxToolkit:AutoCompleteExtender ID="ajaxtitel" runat="server" TargetControlID="txtTitel" ServicePath="LibraryServer.asmx" 
    ServiceMethod="GetScrapApplyTitel" MinimumPrefixLength="1" ></ajaxToolkit:AutoCompleteExtender> 
    <div>
        <div>
            &nbsp;申请标题： &nbsp;<asp:TextBox ID="txtTitel" runat="server"></asp:TextBox>&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label runat="server" ID="State" Text="申请状态："></asp:Label>
            &nbsp;&nbsp;<asp:DropDownList
                runat="server" Width="148px" ID="drop_State"> 
                <asp:ListItem Text="待审批" Value="1"></asp:ListItem>
                 <asp:ListItem Text="审批未通过" Value="2"></asp:ListItem>
                  <asp:ListItem Text="审批通过" Value="3"></asp:ListItem>
                   <asp:ListItem Text="全部" Value="0"></asp:ListItem>
            </asp:DropDownList>
            &nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label runat="server" ID="Branch_name" Text="分 店："></asp:Label>
            &nbsp;&nbsp;<asp:DropDownList runat="server" Width="148px" ID="Branch_Drop"> </asp:DropDownList>
        </div>
        <div>
            <br/>
            &nbsp;起始时间：&nbsp;
            <input id="d12" runat="server" type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'d13\')||\'%y-%M-%d\'}'})" />
            <img onclick="WdatePicker({el:'d12'})" src="../My97DatePicker/skin/datePicker.gif"
                align="middle" width="16" height="22">
            &nbsp;结束时间：&nbsp;
            <input id="d13" runat="server" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'d12\');}',maxDate:'%y-%M-%d'})" />
            <img onclick="WdatePicker({el:'d13'})" src="../My97DatePicker/skin/datePicker.gif"
                align="middle" width="16" height="22">
           &nbsp;&nbsp;
            <asp:Button ID="bnSearch" runat="server" Text="查 询" OnClick="tbnSearch_Click" />
        </div>
        <hr />
        <div>
            <asp:GridView ID="GridView1" CssClass="GridViewStyle" runat="server" AutoGenerateColumns="False" PageSize="25"
                Width="100%" AllowPaging="True" CellPadding="4" EmptyDataText="没有数据记录！！" OnPageIndexChanging="GridView1_PageIndexChanging"
                GridLines="None" DataKeyNames="ID" OnRowCommand="GridView1_RowCommand" 
                onrowdatabound="GridView1_RowDataBound" 
                >
                <Columns>
                    <asp:BoundField DataField="TITEL" HeaderText="标题"  ItemStyle-HorizontalAlign="Center">
                        <ItemStyle Width="20%"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="BRANCH_NAME" HeaderText="店名"  ItemStyle-HorizontalAlign="Center">
                        <ItemStyle Width="15%"></ItemStyle>
                    </asp:BoundField>
                      <asp:BoundField DataField="LIBRARY_NAME" HeaderText="仓库"  ItemStyle-HorizontalAlign="Center">
                        <ItemStyle Width="15%"></ItemStyle>
                    </asp:BoundField>
                    <asp:BoundField DataField="APPLICANT_NAME" HeaderText="申请人"  ItemStyle-HorizontalAlign="Center">
                        <ItemStyle Width="10%"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="申请状态" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                    <a>
                    <%#getState(Eval("STATE").ToString())%>
                    </a>
                    </ItemTemplate>
                    </asp:TemplateField>
                     <asp:BoundField DataField="REMARK" HeaderText="备注" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
                        <ItemStyle Width="10%"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center" >
                    <ItemStyle ></ItemStyle>
                        <ItemTemplate>
                            <%--<asp:LinkButton ID="btnScan" runat="server" Text="查 看" CommandName="Scan" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>--%>
                            <asp:LinkButton ID="btnEdit" runat="server" Text="审 批" CommandName="UpdateData" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                            <%--<asp:LinkButton ID="btnDelete" runat="server" Text="删 除" CommandName="DelData" CommandArgument='<%#Eval("ID")%>'
                                OnClientClick=" return confirm('确定删除？')"></asp:LinkButton>--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <PagerTemplate>
                    <table width="100%">
                        <tr>
                            <td style="text-align: center">
                                第<asp:Label ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />页
                                共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' />页
                                <asp:LinkButton ID="btnFirst" runat="server" CausesValidation="False" CommandArgument="First"
                                    CommandName="Page" Text="首页" />
                                <asp:LinkButton ID="btnPrev" runat="server" CausesValidation="False" CommandArgument="Prev"
                                    CommandName="Page" Text="上一页" />
                                <asp:LinkButton ID="btnNext" runat="server" CausesValidation="False" CommandArgument="Next"
                                    CommandName="Page" Text="下一页" />
                                <asp:LinkButton ID="btnLast" runat="server" CausesValidation="False" CommandArgument="Last"
                                    CommandName="Page" Text="尾页" />
                                <asp:TextBox ID="txtNewPageIndex" runat="server" Width="28px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />
                                <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                    CommandName="Page" Text="GO" /><!-- here set the CommandArgument of the Go Button to '-1' as the flag -->
                            </td>
                        </tr>
                    </table>
                </PagerTemplate>
                <FooterStyle CssClass="GridViewFooterStyle" />
                <RowStyle CssClass="GridViewRowStyle" />
                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                <PagerStyle CssClass="GridViewPagerStyle" />
                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                <HeaderStyle CssClass="GridViewHeaderStyle" />
            </asp:GridView>
        </div>
    </div>
    </form>
</body>
</html>
